package com.mililoan.console.mvc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;


/**
 * Created by zmh on 2016-10-12.
 */
public class SysInit implements ApplicationListener<ContextRefreshedEvent> {
    private static final Logger LOGGER = LoggerFactory.getLogger(SysInit.class);

    public void onApplicationEvent(ContextRefreshedEvent event) {
        LOGGER.info("系统初始化开始");
//        ServletContext servletContext = WebUtil.getServletContext();
//        servletContext.setAttribute("ALL_CHANNEL", channelBo.getAllChannel());
        LOGGER.info("系统初始化结束");
    }
}
